package classTest;

import java.time.LocalDateTime;

public class Bank {
    private String account;
    private String name;
    private LocalDateTime openTime;
    private String idNumber;
    private int balance;
    public void deposit(int money){
        balance+=money;
        System.out.println("存款"+money+"元");
    }
    public void withdraw(int money){
        balance-=money;
        System.out.println("取款"+money+"元");
    }
    public Bank() {
    }

    public Bank(String account, String name, LocalDateTime openTime, String idNumber, int balance) {
        this.account = account;
        this.name = name;
        this.openTime = openTime;
        this.idNumber = idNumber;
        this.balance = balance;
    }



    /**
     * 获取
     * @return account
     */
    public String getAccount() {
        return account;
    }

    /**
     * 设置
     * @param account
     */
    public void setAccount(String account) {
        this.account = account;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return openTime
     */
    public LocalDateTime getOpenTime() {
        return openTime;
    }

    /**
     * 设置
     * @param openTime
     */
    public void setOpenTime(LocalDateTime openTime) {
        this.openTime = openTime;
    }

    /**
     * 获取
     * @return idNumber
     */
    public String getIdNumber() {
        return idNumber;
    }

    /**
     * 设置
     * @param idNumber
     */
    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    /**
     * 获取
     * @return balance
     */
    public int getBalance() {
        return balance;
    }

    /**
     * 设置
     * @param balance
     */
    public void setBalance(int balance) {
        this.balance = balance;
    }

    public String toString() {
        return "Bank{account = " + account + ", name = " + name + ", openTime = " + openTime + ", idNumber = " + idNumber + ", balance = " + balance + "}";
    }
}
